import { createRouter, createWebHashHistory } from "vue-router";

import Introducion from "@/views/Introducion/index.vue";

const routes = [
  {
    path: "/",
    name: "introducion",
    component: Introducion,
    meta: { title: "说明", icon: "Paperclip", alwaysShow: false },
  },
  {
    path: "/transfer",
    name: "transfer",
    component: () => import("@/views/Transfer/index.vue"),
    meta: { title: "移交查询", icon: "Guide", alwaysShow: false },
  },
  {
    path: "/sector",
    name: "sector",
    redirect: "/sector/TMA",
    // component: () => import("@/views/SeatStatus/index.vue"),
    meta: { title: "扇区信息", icon: "Compass", alwaysShow: true },
    children: [
      {
        path: "/sector/TMA",
        name: "SectorTMA",
        component: () => import("@/views/SeatStatus/TMA/index.vue"),
        meta: { title: "终端扇区", icon: "Promotion" },
      },
      {
        path: "/sector/ACC",
        name: "SectorACC",
        component: () => import("@/views/SeatStatus/ACC/index.vue"),
        meta: { title: "区管扇区", icon: "LocationFilled" },
      },

      {
        path: "/sector/History",
        name: "SectorHistory",
        component: () => import("@/views/SeatStatus/History/index.vue"),
        meta: { title: "扇区历史", icon: "Histogram" },
      },
      {
        path: "/sector/Runway",
        name: "RunwayHistory",
        component: () => import("@/views/SeatStatus/Runway/index.vue"),
        meta: { title: "跑道信息", icon: "WindPower" },
      },
    ],
  },
  {
    path: "/hours",
    name: "hours",
    redirect: "/hours/DevTool",
    // component: () => import("@/views/HourStatus"),
    meta: { title: "打卡数据", icon: "Clock", alwaysShow: true },
    children: [
      {
        path: "/hours/GeneralView",
        name: "hoursGeneralView",
        component: () => import("@/views/HourStatus/GeneralView"),
        meta: { title: "常规统计", icon: "Histogram" },
      },
      // {
      //   path: "/hours/trainingSummary",
      //   name: "trainingSummary",
      //   component: () => import("@/views/HourStatus/TrainingSummary"),
      //   meta: {
      //     title: "岗位时间统计 (带培)",
      //     icon: "Timer",
      //     alwaysShow: false,
      //   },
      // },
      {
        path: "/hours/HourSummary",
        name: "HourSummary",
        component: () => import("@/views/HourStatus/HourSummary"),
        meta: {
          // title: "岗位时间统计 (全部)",
          title: "岗位时间统计",
          icon: "Timer",
          alwaysShow: false,
        },
      },
      {
        path: "/hours/WorkingDays",
        name: "WorkingDays",
        component: () => import("@/views/HourStatus/WorkingDays"),
        meta: {
          title: "值班统计 (远郊/夜餐/加班)",
          icon: "Suitcase",
          alwaysShow: false,
        },
      },
      {
        path: "/hours/WorkingDeclaration",
        name: "WorkingDeclaration",
        component: () => import("@/views/HourStatus/WorkingDeclaration"),
        meta: {
          title: "值班申报",
          icon: "Pointer",
          alwaysShow: false,
        },
      },
      {
        path: "/hours/DevTool",
        name: "hoursDevTool",
        component: () => import("@/views/HourStatus/DevTool"),
        meta: { title: "DevTool", icon: "MagicStick" },
      },
    ],
  },
  {
    path: "/activity",
    name: "Activity",
    redirect: "/hours/DevTool",
    // component: () => import("@/views/Activity/index.vue"),
    meta: { title: "动态信息", icon: "Monitor", alwaysShow: true },
    children: [
      {
        path: "/activity/Briefing",
        name: "ActivityBriefing",
        component: () => import("@/views/Activity/Briefing/index.vue"),
        meta: { title: "活动概要", icon: "List" },
      },
      {
        path: "/activity/Diversion",
        name: "ActivityDiversion",
        component: () => import("@/views/Activity/Diversion/index.vue"),
        meta: { title: "改航信息", icon: "Connection" },
      },
      {
        path: "/activity/HistoryMiltary",
        name: "ActivityHistoryMiltary",
        component: () => import("@/views/Activity/HistoryMiltary/index.vue"),
        meta: { title: "活动记录", icon: "VideoCamera" },
      },
    ],
  },
  {
    path: "/flow",
    name: "flow",
    redirect: "/flow/DevHandler",
    meta: { title: "流量状态", icon: "Odometer", alwaysShow: true },
    children: [
      {
        path: "/flow/GeneralChart",
        name: "flowGeneralChart",
        component: () => import("@/views/FlowStatus/GeneralChart"),
        meta: { title: "常规图表", icon: "Histogram" },
      },
      {
        path: "/flow/AdvancedChart",
        name: "flowAdvancedChart",
        component: () => import("@/views/FlowStatus/AdvancedChart"),
        meta: { title: "切片图表", icon: "PieChart" },
      },
      // {
      //   path: "/flow/ExtraChart",
      //   name: "flowExtraChart",
      //   component: () => import("@/views/FlowStatus/ExtraChart"),
      //   meta: { title: "补充图表", icon: "DataAnalysis" },
      // },
      {
        path: "/flow/ClassicPolicyScale",
        name: "flowClassicPolicyScale",
        component: () => import("@/views/FlowStatus/ClassicPolicyScale"),
        meta: { title: "决策量表", icon: "List" },
      },
      {
        path: "/flow/DataQuery",
        name: "flowDataQuery",
        component: () => import("@/views/FlowStatus/DataQuery"),
        meta: { title: "数据查询", icon: "Search" },
      },
      // {
      //   path: "/flow/RawDataView",
      //   name: "flowRawDataView",
      //   component: () => import("@/views/FlowStatus/RawDataView"),
      //   meta: { title: "原始数据", icon: "Files" },
      // },
      {
        path: "/flow/DataLoader",
        name: "DataLoader",
        component: () => import("@/views/FlowStatus/DataLoader"),
        meta: { title: "数据生成器", icon: "Filter" },
      },
      // {
      //   path: "/flow/DevHandler",
      //   name: "flowDevHandler",
      //   component: () => import("@/views/FlowStatus/DevHandler"),
      //   meta: { title: "测试工具", icon: "MagicStick" },
      // },
    ],
  },
  {
    path: "/planner",
    name: "Planner",
    redirect: "/planner/AMAN",
    meta: { title: "PLANNER", icon: "Help", alwaysShow: false },
    children: [
      {
        path: "/planner/AMAN",
        name: "AMAN",
        component: () => import("@/views/Planner/AMAN/index.vue"),
        meta: { title: "AMAN N值", icon: "Cherry" },
      },
      {
        path: "/planner/Capacity",
        name: "Capacity",
        component: () => import("@/views/Planner/Capacity/index.vue"),
        meta: { title: "通行能力", icon: "Lightning" },
      },
    ],
  },
  /*
  {
    path: "/CEM",
    name: "CEM",
    redirect: "/CEM/Configuration",
    meta: { title: "扇区建议", icon: "Cpu", alwaysShow: true },
    // component: () => import("@/views/CEM/index.vue"),
    children: [
      {
        path: "/CEM/Current",
        name: "CEMCurrent",
        component: () => import("@/views/CEM/CurrentAdvise/index.vue"),
        meta: { title: "当前建议", icon: "Opportunity" },
      },
      {
        path: "/CEM/Input",
        name: "CEMInput",
        component: () => import("@/views/CEM/FlightInput/index.vue"),
        meta: { title: "非民航计划", icon: "Edit" },
      },
      {
        path: "/CEM/Configuration",
        name: "CEMConfiguration",
        component: () => import("@/views/CEM/index.vue"),
        meta: { title: "CEM参数配置", icon: "Operation" },
      },
    ],
  },
*/
  {
    path: "/contacts",
    name: "Contacts",
    component: () => import("@/views/Contacts/index.vue"),
    meta: { title: "通讯录", icon: "Notebook", alwaysShow: false },
  },
  {
    path: "/ATCOS",
    name: "ATCOS",
    component: () => import("@/views/ATCOS/index.vue"),
    meta: { title: "打卡系统", icon: "Pointer", alwaysShow: false },
  },
  {
    path: "/checklists",
    name: "checklists",
    redirect: "/checklists/uavs",
    meta: { title: "检查单", icon: "MessageBox", alwaysShow: false },
    children: [
      {
        path: "/checklists/SectorOpenAndClose",
        name: "sectorOpenAndClose",
        component: () => import("@/views/Checklists/HandleUAVs/index.vue"),
        meta: { title: "开合扇检查单", icon: "Checked" },
      },
      {
        path: "/checklists/uavs",
        name: "uavs",
        component: () => import("@/views/Checklists/HandleUAVs/index.vue"),
        meta: { title: "无人机处置检查单", icon: "Checked" },
      },
    ],
  },
  {
    path: "/Journal",
    name: "Journal",
    redirect: "/Journal/EquipmentIssues",
    meta: { title: "信息记录", icon: "Collection", alwaysShow: true },
    children: [
      {
        path: "/Journal/Visit",
        name: "LeaderVisit",
        component: () => import("@/views/Journal/LeaderVisit/index.vue"),
        meta: { title: "来访记录", icon: "UserFilled" },
      },
      {
        path: "/Journal/DiversionShare",
        name: "DiversionShare",
        component: () => import("@/views/Journal/DiversionShare/index.vue"),
        meta: { title: "备降/返航记录", icon: "Notebook" },
      },
      // {
      //   path: "/Journal/StickyNotes",
      //   name: "StickyNotes",
      //   component: () => import("@/views/Journal/StickyNotes/index.vue"),
      //   meta: { title: "全局便签", icon: "Notebook" },
      // },
      // {
      //   path: "/Journal/FlowNotes",
      //   name: "FlowNotes",
      //   component: () => import("@/views/Journal/FlowNotes/index.vue"),
      //   meta: { title: "正常率记录", icon: "TrendCharts" },
      // },
      // {
      //   path: "/Journal/SpeedDeviation",
      //   name: "SpeedDeviationRecord",
      //   component: () => import("@/views/Journal/SpeedDeviation/index.vue"),
      //   meta: { title: "调速偏差记录", icon: "Warning" },
      // },
      // {
      //   path: "/Journal/ReadbackRectify",
      //   name: "ReadbackRectify",
      //   component: () => import("@/views/Journal/ReadbackRectify/index.vue"),
      //   meta: { title: "错误复诵纠正", icon: "Service" },
      // },
      // {
      //   path: "/Journal/EquipmentIssues",
      //   name: "EquipmentIssues",
      //   component: () => import("@/views/Journal/EquipmentIssues/index.vue"),
      //   meta: { title: "设备问题记录", icon: "Mouse" },
      // },
      {
        path: "/Journal/CXO",
        name: "CXORecord",
        component: () => import("@/views/Journal/CXORecord/index.vue"),
        meta: { title: "CXO/PMS/VA 记录", icon: "Notebook" },
      },
      {
        path: "/Journal/GeneralReport",
        name: "GeneralReport",
        component: () => import("@/views/Journal/GeneralReport/index.vue"),
        meta: { title: "月报数据统计", icon: "DataAnalysis" },
      },
      {
        path: "/Journal/PositionReport",
        name: "PositionReport",
        component: () => import("@/views/Journal/PositionReport/index.vue"),
        meta: { title: "位置记录", icon: "Position" },
      },
    ],
  },
];

const router = createRouter({
  history: createWebHashHistory(),
  routes,
});

export default router;
